
$(document).ready(function() { 
	$("#picture").change(function(evt){
	
		var files = evt.target.files; 
        readfile(files);
    });
	
    
    function readfile(fileList)
    {
    	for (var i = 0, f; f = fileList[i]; i++) {
	           if (!f.type.match('image.*')) {
	             continue;
	           }       	          
	           var reader = new FileReader();
	           reader.onload = (function(theFile) {
	             return function(e) {                                
		       //       $("#photo").attr("src",e.target.result);
		              var div = document.getElementById("photo");
		              var img = document.createElement("img");
		              img.setAttribute("id","imgte");
		              img.src=e.target.result;
		              img.width =100;
		              img.height=80;
		              img.style.margin = "4px 4px 4px 0";
		              div.appendChild(img);
	             };
	           })(f);
	           reader.readAsDataURL(f);
	         }
    };
	});

$(function(){
	$("#imgte").click(function(){
		alert("123");
		this.width =200;
        this.height=150;
        this.style.margin = "4px 4px 4px 0";
        this.attr("z-index","1000");
	});
});